package adfc2.items;

import adfc2.core.Item;
import adfc2.core.Material;

/**
 * Простой предмет --- материал + тип
 */
public abstract class SimpleItem extends Item {
    public final Material material;
    public final Item.Type type;

    public SimpleItem(Item.Type type, Material material) {
        this.type = type;
        this.material = material;
    }

    @Override
    public String shortName() {
        return material.shortName() + " " + type.shortName();
    }

    @Override
    public Material material() {
        return material;
    }

    @Override
    public Type type() {
        return type;
    }

    @Override
    public String toString() {
        return "[" + shortName() + "]";
    }

}
